package module.shop.model.dataObj
{
	import code.obj.IconObj;

	public class CommodityObj extends IconObj
	{
		public var gold:int;
		public var food:int;
		public var stone:int;
		public var iron:int;
		public var wood:int;
		
		public function CommodityObj()
		{
		}
		
		public static function parseData(obj:Object):CommodityObj
		{
			var returnObj:CommodityObj = new CommodityObj();
			returnObj.gold = obj.gold;
			returnObj.food = obj.food;
			returnObj.stone = obj.stone;
			returnObj.iron = obj.iron;
			returnObj.serverId = obj.serverId;
//			returnObj.name = obj.name;
			returnObj.name = obj.name;
			returnObj.wood = obj.wood;
			
			return returnObj;
		}
		
		public function clone():CommodityObj
		{
			var returnObj:CommodityObj = new CommodityObj();
			returnObj.gold = this.gold;
			returnObj.food = this.food;
			returnObj.stone = this.stone;
			returnObj.iron = this.iron;
			returnObj.serverId = this.serverId;
			returnObj.name = this.name;
			returnObj.wood = this.wood;
			
			return returnObj;
		}
	}
}